{% extends "base.html" %}

{% block content %}


<div class="row-fluid">
	 <!-- block -->
	 <div class="block">
		 <div class="navbar navbar-inner block-header">
			 <div class="muted pull-left">订单列表</div>
		 </div>
		 <div class="block-content collapse in">
			 <div class="span12">
				 <div class="table-toolbar">
					 <div class="btn-group">
						 <!--<a href="#"><button class="btn btn-success">增加<i class="icon-plus icon-white"></i></button></a>-->
					 </div>
					 <div class="btn-group pull-right">
						 <button data-toggle="dropdown" class="btn dropdown-toggle">工具 <span class="caret"></span></button>
						 <ul class="dropdown-menu">
							 <li><a href="#">打印</a></li>
							 <li><a href="#">保存PDF</a></li>
							 <li><a href="#">导出为Excel</a></li>
						 </ul>
					 </div>
				 </div>

				 <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example2">
					 <thead>
					 <tr>
						 <td>订单号</td>
						 <td>联系人</td>
						 <td>负责人</td>
						 <td>预付款</td>
						 <td>状态</td>
					 </tr>
					 </thead>
					 <tbody  >
					 {% if order_list %}
					 {% for order in order_list %}
					 <tr class="odd gradeX">
						 <td><a href=/detail/?id={{ order.orderID }}>{{ order.orderID }}</a></td>
		                 <td>{{ order.client.name }}</td>
		                 <td>{{ order.saleman.name }}</td>
		                 <td>{{ order.advancePay }}</td>
		                 <td class="center"> {{ order.status.name }}</td>

		             </tr>
                     {% endfor %}

                     {% else %}
                     <p>没有符合条件的订单</p>
                     {% endif %}

	                 </tbody>

				 </table>
			 </div>
		 </div>
	 </div>
                        <!-- /block -->
 </div>

{% endblock %}